

<html>
    <head>
        <nav:resources/>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>topic</title>
    </head>
    <body><g:render template="/banner"/>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${resource(dir:'')}">Home</a></span>
            <span class="menuButton"><g:link class="create" action="create">New Topic</g:link></span>
        </div>
        <div class="body">
            <h1>话题</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="list">
                <g:each in="${topicInstanceList}" status="i" var="topicInstance">
                    <div class="${(i % 2) == 0 ? 'odd' : 'even'}">
                    
                        <p><g:link action="show" id="${topicInstance.id}">${fieldValue(bean:topicInstance, field:'name')}</g:link></p>
                    
                        <p>${fieldValue(bean:topicInstance, field:'topicCategory')}</p>
                    
                        <p>${fieldValue(bean:topicInstance, field:'description')}</p>
                    
                        <p>${fieldValue(bean:topicInstance, field:'dateCreated')}</p>
                    
                        <p>${fieldValue(bean:topicInstance, field:'lastUpdated')}</p>
                    	<g:form>
                    		<input type="hidden" name="id" value="${topicInstance?.id}" />
                    		<span class="button"><g:actionSubmit class="edit" value="发言" action="JoinSpeak"/></span>
                    		<span class="button"><g:actionSubmit class="edit" value="观众" action="JoinSpeak"/></span>
                    	</g:form>
                    </div>
                </g:each>
            </div>
            <div class="paginateButtons">
                <g:paginate total="${topicInstanceTotal}" />
            </div>
        </div>
    </body>
</html>
